#include<bits/stdc++.h>
#define ll long long
#define ull unsigned long long
using namespace std;

const ll N = 2e5 + 10, INF = 0x3f3f3f3f;

ll n;
ll a[N], cnt[N];
ll up[N], ans[N];

void solve()
{
    memset(up, 0, sizeof up);
    memset(cnt, 0, sizeof cnt);
    memset(ans, 0, sizeof ans);
    cin >> n;
    for (ll i = 0;i < n;i++) {
        cin >> a[i];
        cnt[a[i]]++;
    }

    for (ll i = 0;i <= n;i++) {
        ans[cnt[i]]++;
        ans[n - i + 1]--;
        if (cnt[i] == 0) break;
    }

    for (ll i = 0, x = 0;i <= n;i++) {
        x += ans[i];
        cout << x << ' ';
    }
    cout << '\n';
}

signed main()
{
    // ios::sync_with_stdio(0);
    // cin.tie(0);cout.tie(0);
#define ONLINE_JUDGE
#ifndef ONLINE_JUDGE
    std::istringstream in(R"()");
    std::cin.rdbuf(in.rdbuf());
#endif
    ll T = 1;
    cin >> T;
    for (ll i = 1;i <= T;i++) {
        solve();
    }
}